/*
编写 : Hexh
时间 : 2012-5-17 11:04:43
*/
using System;
using System.Collections;
using System.Text;
using HMIS.FrameWork.DomainBase;
using HMIS.Infrastructure.Core.Authority;
using HMIS.FrameWork;
using HMIS.Infrastructure.Core.Entities;

namespace FsCarInfo.Core.Entity
{
	/// <summary>
	///	the entity of FsCarbaseinfo
	/// </summary>
	[Serializable]
	public class FsCarbaseinfo : BaseEntity
	{

		#region Public Properties

		/// <summary>
		/// 整车ID卡
		/// </summary>
		public virtual InfraIdcard ICCard { get; set; }

		/// <summary>
		/// 车钥匙ID卡
		/// </summary>
		public virtual InfraIdcard KeyICCard { get; set; }

		/// <summary>
		/// 整车ID卡编号
		/// </summary>
		public virtual string ICCardUId { get; set; }

		/// <summary>
		/// 车钥匙ID卡编号
		/// </summary>
		public virtual string KeyICCardUId { get; set; }

		/// <summary>
		/// 展场
		/// </summary>
		public virtual string DepartmentId { get; set; }

		/// <summary>
		/// 展场机构
		/// </summary>
		public virtual Department Department { get; set; }

		/// <summary>
		/// 品牌
		/// </summary>
		public virtual string Brand{ get; set; }

		/// <summary>
		/// 系列
		/// </summary>
		public virtual string Series { get; set; }

		/// <summary>
		/// 型号
		/// </summary>
		public virtual string Model { get; set; }

		/// <summary>
		/// 颜色
		/// </summary>
		public virtual string Color { get; set; }

		/// <summary>
		/// 发动机号
		/// </summary>
		public virtual string EnginId { get; set; }

		/// <summary>
		/// 车架号
		/// </summary>
		public virtual string FrameId { get; set; }

		/// <summary>
		/// 出厂日期
		/// </summary>
		public virtual DateTime ProdDate { get; set; }

		/// <summary>
		/// 里程
		/// </summary>
		public virtual decimal Mileage { get; set; }

		/// <summary>
		/// 市场指导价
		/// </summary>
		public virtual decimal MarketPrice { get; set; }

		/// <summary>
		/// 入库日期
		/// </summary>
		public virtual DateTime? StoreDate { get; set; }

		/// <summary>
		/// 附件工具包
		/// </summary>
		public virtual int AtmGjb { get; set; }

		/// <summary>
		/// 附件备胎
		/// </summary>
		public virtual int AtmBt { get; set; }

		/// <summary>
		/// 附件说明书
		/// </summary>
		public virtual int AtmSms { get; set; }

		/// <summary>
		/// 附件点烟器
		/// </summary>
		public virtual int AtmDyq { get; set; }

		/// <summary>
		/// 附件保修卡
		/// </summary>
		public virtual int AtmBxk { get; set; }

		/// <summary>
		/// 附件车钥匙
		/// </summary>
		public virtual int AtmKey { get; set; }

		/// <summary>
		/// 附件天线
		/// </summary>
		public virtual int AtmMast { get; set; }

		/// <summary>
		/// 附件雨刮
		/// </summary>
		public virtual int AtmWiper { get; set; }

		/// <summary>
		/// 附件合格证
		/// </summary>
		public virtual int AtmCertificate { get; set; }

		/// <summary>
		/// 客户ID
		/// </summary>
		public virtual string CustId { get; set; }

		/// <summary>
		/// 状态
		/// </summary>
		public virtual FsCarState State { get; set; }

		#endregion

		#region Pulbic Method

		/// <summary>
		/// 生成短信信息
		/// </summary>
		/// <returns></returns>
		public virtual string ToSmsString()
		{
			return "[" + this.Brand + "," + this.Series + ","
				+ this.Model + "," + this.Color + ","
				+ this.ProdDate.ToString("yyyy-MM-dd") + ","
				+ this.EnginId + "," + this.FrameId + "]";
		}

		#endregion
	}

	/// <summary>
	/// 商品车状态
	/// ['0', '待复核'], ['1', '在库'], ['2', '已提出'], ['3', '已售']
	/// </summary>
	public enum FsCarState
	{
		[EnumDescription("待复核")]
		ToStore = 0,

		[EnumDescription("在库")]
		InStore = 1,

		[EnumDescription("已提出")]
		InTransfer = 2,

		[EnumDescription("已售")]
		Selled = 3
	}
}
